<template>

    <div>
        <div class="btnGroupBox">

            <div v-for="(item,i) in btnGroup" :key="i">
                <div v-if="item.type=='primary'||
                           item.type=='success'||
                           item.type=='info'   ||
                           item.type=='warning'||
                           item.type=='danger'">
                    <el-button
                            :loading="item.loading?item.loading:false"
                            :size="item.size?item.size:'medium'"
                            :type="item.type"
                            :icon="item.icon?item.icon:''"
                            @click="item.action">
                        {{item.label}}
                    </el-button>
                </div>
            </div>

        </div>
    </div>
</template>

<script>
    export default {
        name: 'VaBtnGroup',
        props: {
            btnGroup: {
                type: Array,
                default: () => []
            }
        },

    }
</script>

<style scoped>
    .btnGroupBox > div {
        display: inline-block;
        margin-right: 10px;
        /*margin-bottom: 16px;*/
        float: left;
    }

    .iconfont {
        margin-right: 5px;
    }
</style>